<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<!DOCTYPE html>
<html lang="zh-CN">
<head> 
   <meta charset="UTF-8">
   <%@ include file="/WEB-INF/views/include/head.jsp"%>
   <link rel="stylesheet" href="${ctxStatic}/css/common_erp.css">
   <link rel="stylesheet" href="${ctxStatic}/css/layerSm.css">
   <script src="${ctxStatic}/js/jquery-1.9.1.min.js"></script>
   <script src="${ctxStatic}/js/layer.js"></script>
   <script src="${ctxStatic}/js/style.js"></script>
   <script src="${ctxStatic}/jquery-barcode/jquery-barcode.js" type="text/javascript"></script>
   <script type="text/javascript">
   
	$(document).ready(function(){
		var imageStr = '${imageStr}';
		if (imageStr == 'customizationUnitCost'&&$('#id').val()=="") {
			getCoMaterialList();
		}else if (imageStr == 'customizationUnitCost'&&$('#id').val()!=""){
			var productionID = $("#contractID").find("option:selected").attr("pId-value");
	    	var productionNo = $("#contractID").find("option:selected").attr("pNo-value");
	    	$("#productionID").val(productionID);
	    	$("#productionNoText").text(productionNo);
		}
		$("#contractID").select2();
		if ($('#id').val()!="") {
			$("#contractID").attr("disabled",true);
		}
		if (imageStr == 'produceNotice') {
			$("#ognizationID").select2();
			$("#ognizationID").attr("disabled",true);
			//$("#productionID").select2();
			//$("#inventoryRequestBarCodeDiv").empty().barcode($("#stockBarCode").val(), "code128",{barWidth:2, barHeight:30,showHRI:false});
			//productionFun($("#productionID"));
			//$("#productionID").attr("disabled",true);
			newCostomer();
			
		}
		$("#inventoryCategory").select2();
	});
	function pad2(n) { return n < 10 ? '0' + n : n }
	
	// 返回年月日时分秒
	function generateTimeReqestNumber() {
	    var date = new Date();
	    return date.getFullYear().toString() + pad2(date.getMonth() + 1) + pad2(date.getDate()) + pad2(date.getHours()) + pad2(date.getMinutes()) + pad2(date.getSeconds());
	}
	function productionFun(t){
		// 创建
		/* var vId = $('#id').val();
		if(vId == null || vId == '' || vId == "undefined"){
			var simpleName=$(t).find("option:selected").attr("data-value");
			if(simpleName!=null && simpleName!=''){
				simpleName = simpleName.toUpperCase();
			}
			// 客户简称4位年月日时分秒
			$("#inventoryRequestNo").val(generateTimeReqestNumber());
		}	 */
		var productionID = $(t).find("option:selected").val();
    	var param={"productionID":productionID,"imageStr":"${imageStr}"};
    	$.post("${ctx}/inventory/requestex/productionFun",param,function(result){            
        	$("#productionInfo").html($(callBackHtml(result)).find("#productionInfo").html());
        	$("#tableRequestDetails").html($(callBackHtml(result)).find("#tableRequestDetails").html());
        	// 创建
        	if ("${puttingRequest.id==null || puttingRequest.id==''}") {
				var out = "O.";
				//var indentNo = $('#indentNoHtml').html();
				var sequenceReturnCode = '${sequenceReturnCode}';
				indentNo = out + $(t).find("option:selected").text().replace(" ","");
				$("#inventoryRequestNo").val(indentNo);
				$("#iRNoHtml").html(indentNo);
			}
        },'html');
	}
    function checkQuantity(t){
    	var inputQuantity = parseInt(($(t).val()).replace(/,/g,""));
    	var thisTR = t.parentNode.parentNode;
    	var materialQuantity = parseInt($(thisTR).find(".mQuantity").val());
    	if(materialQuantity<inputQuantity){
    		tipParent("<spring:message code="inventory_requestex_check_quantity_msg"/>");
    		$(t).val("");
    		return false;
    	}
    }
    
    var flag = "true";
    var materialCode = "";
    //保存方法
    var saveForm={
         t:null,
         save:function(t){
        	 if (flag == "false") {
        		 
      		   if(!confirm(materialCode+"物料库存数量不足，是否继续？")){
      			 return;
      		   }
				
			}
              $(t).attr("disabled",true);
              this.t=t;
              // 表单验证
              $("#inputForm").validate({
              fail: function(element,e) {  
                  $(saveForm.t).attr("disabled",false);
              },
                   submitHandler: function() {
                	   $('#inventoryCategory').attr('disabled',false);
                	   $("#contractID").attr("disabled",false);
                	   $("#ognizationID").attr("disabled",false);
                	   $("#indentID").attr("disabled",false);
                   	   // 格式化，去除逗号
                       formUnFormat($("#inputForm"));
                        // 从表单获取数据信息
                        var params = $("#inputForm").serialize();
                       $("#loadingPano").showLoading();
                        // 调用后台保存方法
                        $.post("${ctx}/inventory/requestex/save",params,function(result){
                            $("#loadingPano").hideLoading();
                             // 提示信息
                             tipParent(result.message);
                             // 返回状态
                             if(result.statusCode==STATUSCODEOK){
                            	 var imageStr = "${imageStr}"
                            	 if (imageStr == "produceNotice") {
                            		 window.parent.frames[window.parent.frames.length-2].closeWin();
								 }
                                 // 刷新页面
                                 window.parent.frames[0].searchListForm();
                                 closeWin();
                             }else{
                                  $(saveForm.t).attr("disabled",false);
                             }
                        },'json'); 
                   }
              });
              // 提交表单
              $("#inputForm").submit(); 
         } 
    }
    /* 定制合同联动 单耗  */
    function getCoMaterialList(){
    	flag = "true";
        materialCode = "";
    	var productionID = $("#contractID").find("option:selected").attr("pId-value");
    	var productionNo = $("#contractID").find("option:selected").attr("pNo-value");
    	$("#productionID").val(productionID);
    	$("#productionNoText").text(productionNo);
    	var contractNo = $("#contractID").find("option:selected").text();
    	var contractID = $("#contractID").val();
    	if (contractID != ""&&contractID != null) {
    		$("#inventoryRequestNo").val("OMTM."+contractNo);
    		$("#iRNoHtml").html("OMTM."+contractNo);
		}
    	var html = "";
        $("#loadingPano").showLoading();
    	$.post("${ctx}/customization/unitcost/getMaterialList?contractID="+contractID,"",function(result){
    		$(result).each(function(i,e) {
    			var count = parseInt(i)+parseInt(1);
    			var flagTemp = "true";
    			html += "<tr";
    			if (e.materialQuantity < e.requestQuantity || e.materialQuantity == 0) {
    				html += " style='background-color:#fbaea8'";
    				flag = "false";
    				flagTemp = "false";
    				if (materialCode == "") {
	    				materialCode = e.materialCode;
					}
				}
    			html += "><td style='width:50px;'>"+count+"</td>";
    			html += "<td class='tab-wltp'>";
    			if (e.filePath != null && e.filePath != "") {
    				html += "<img src='"+e.filePath+"' class='wltp'></td>";
				}else {
					html += "<img src='${ctxStatic}/images/pic-none.jpg' class='wltp'></td>";
				}
    			html += "<td><p class='tab-wlmcbj'>"+e.materialCode+"</p></td>";
    			html += "<td><p class='width-80px'>"+e.materialCategory+"</p></td>";
    			html += "<td><p class='width-80px'>"+e.materialColor+"</p></td>";
    			html += "<td><p class='width-80px'>"+e.materialComposition+"</p></td>";
    			html += "<td><p class='width-80px'>"+e.materialSpec+"</p></td>";
    			html += "<td class='qt1 subDetails width-120px'";
    			if (flagTemp == "false") {
    				html += "style='color:red'";
				}
    			html += ">"+e.materialQuantity+"</td>";
    			html += "<td class='qt2 subDetails width-120px'>"+e.requestQuantity+"</td>";
    			html += "<input type='hidden' name='requestDetailsList["+i+"].materialId' value='"+e.materialIDEX+"'/>";
    			html += "<input type='hidden' name='requestDetailsList["+i+"].requestQuantity' value='"+e.requestQuantity+"'></tr>";
    			html += "<input type='hidden' name='requestDetailsList["+i+"].materialCode' value='"+e.materialCode+"'></tr>";
			});
    		$("#tbodyHtml").html(html);
    		var clength = $(".qt1").length;
    		for (var i = 0; i < clength; i++) {
    			formatMoneyThis($(".qt1")[i], 2);
    			formatMoneyThis($(".qt2")[i], 2);
			}
    		
    		$("#loadingPano").hideLoading();
        },'json');  
    }
    
  //格式化金额
    function formatMoneyThis(e, n) {  
    	var s=$(e).text().replace(",","").trim();
    	//判断字符串是否为数字     //判断正整数 /^[1-9]+[0-9]*]*$/  
    	var numberVerification = /^[0-9]+.?[0-9]*$/;   
        if (numberVerification.test(s)){
        	n = n > 0 && n <= 20 ? n : 2;  
            s = parseFloat((s + "").replace(/[^\d\.-]/g, "")).toFixed(n) + "";  
            var l = s.split(".")[0].split("").reverse(), r = s.split(".")[1];  
            t = "";  
            for (var i = 0; i < l.length; i++) {  
                t += l[i] + ((i + 1) % 3 == 0 && (i + 1) != l.length ? "," : "");  
            } 
            $(e).text(t.split("").reverse().join("") + "." + r);
        }else{
        	$(e).text("");
        }
    }  
  
    //
    function newCostomer(){
    	var ognizationID = $("#ognizationID option:selected").val();
    	var param = {
				"venderId" : ognizationID,"indentID":$("#indentIdTemp").val(),"imageStr":"${imageStr}"
			};
    	// 调用后台更新数据
        $.post("${ctx}/inventory/requestex/findIndent",param,function(result) {
            // 回调函数赋值
            var h = $(callBackHtml(result)).find("#indentHtml").html();
            $('#indentHtml').html(h);
			$("#indentID").select2();
			$("#indentID").attr("disabled",true);
			changeIndent();
        }, 'html');
    	
    }
    
    /* 订单联动  */
    function changeIndent(){
    	var indentID = $("#indentID option:selected").val();
    	var param = {
				"indentID" : indentID,"imageStr":"${imageStr}"
			};
    	$.post("${ctx}/inventory/requestex/findIndentInfo",param,function(result) {
            // 回调函数赋值
    		var styleHtml = $(callBackHtml(result)).find("#styleHtml").html();
    		$('#styleHtml').html(styleHtml);
    		if($('#id').val()==""){
    			$("#tableRequestDetails").html($(callBackHtml(result)).find("#tableRequestDetails").html());
    		}
    		var indentNo = "O." + $("#indentID").find("option:selected").text().replace(" ","");
			$("#inventoryRequestNo").val(indentNo);
			$("#iRNoHtml").html(indentNo);
        }, 'html');
    }
    
 // 显示选择物料
	function showInventoryMaterial(){
		popup('1230px','680px','${ctx}/common/material/list');
	}
 
	// 选择物料回调
    function selectMaterialCallBack(selectIndex,objMaterials){
    	if(selectIndex==null || selectIndex==''){
    		return;
    	}
    	
    	// 分割选择id
    	strSelects = selectIndex.split(",");
    	var materialIndex = $("#tableRequestDetails tr").length;
    	for (i=0;i<objMaterials.length ;i++ ){
    		 for(j=0;j<strSelects.length;j++){
    			  var idx = parseInt(strSelects[j]);
                  if(i==idx){
		    		 if(!isMaerialRepeate(objMaterials[i].materialId)){
		    			 $("#tableRequestDetails").append('<tr>' +
		    					                          '<input type="hidden" class="subMaterialId" name="requestDetailsList[' + materialIndex + '].materialId" value="' + objMaterials[i].materialId + '"/>' +
		    					                          '<input type="hidden" name="requestDetailsList[' + materialIndex + '].filePath" value="' + objMaterials[i].fileName + '"/>' +
		    					                          '<input type="hidden" name="requestDetailsList[' + materialIndex + '].materialNameCn" value="' + objMaterials[i].materialNameCn + '"/>' +
		    					                          '<input type="hidden" name="requestDetailsList[' + materialIndex + '].materialCode" value="' + objMaterials[i].materialCode + '"/>' +
		    					                          '<input type="hidden" name="requestDetailsList[' + materialIndex + '].materialSpec" value="' + objMaterials[i].materialSpec + '"/>' +
		    					                          '<input type="hidden" name="requestDetailsList[' + materialIndex + '].materialComposition" value="' + objMaterials[i].materialComposition + '"/>' +
		    					                          '<input type="hidden" name="requestDetailsList[' + materialIndex + '].materialColor" value="' + objMaterials[i].materialColor + '"/>' +
		    					                          '<input type="hidden" name="requestDetailsList[' + materialIndex + '].materialQuantity" value="' + objMaterials[i].materialQuantity + '"/>' +
		    			                                   '</tr>');
		    		 	materialIndex++;
		    		 }
                  }    			 
    		 }
    	}
    	
    	formUnFormat($("#inputForm"));
 	    var params = $("#inputForm").serialize();
        // 调用后台更新数据
        $.post("${ctx}/inventory/requestex/addRequestExDetails",params,function(result) {
            // 回调函数赋值
            var h = $(callBackHtml(result)).find("#tableRequestDetails").html();
            $('#tableRequestDetails').html(h);
        }, 'html');
 
	}
 // 原辅料重复
    function isMaerialRepeate(itemValue) {

         var number = 0;
         // 从页面获取值 进行比较
         $("#tableRequestDetails tr").each(function(j){
            if (itemValue == $(this).find('.subMaterialId').val()) {
                 number = number+1;
          }
         });
        
         if (number> 0) {
            return true;
         } else {
            return false;
         }
    }
 
 // 删除明细
    function deleteInventoryRequestExDetials(trIndex){
    	$("#trIndex").val(trIndex);
    	// 格式化，去除逗号
        formUnFormat($("#inputForm"));
 	    var params = $("#inputForm").serialize();
        // 调用后台更新数据
        $.post("${ctx}/inventory/requestex/delRequestExDetails",params,function(result) {
            // 回调函数赋值
            var h = $(callBackHtml(result)).find("#tableRequestDetails").html();
            $('#tableRequestDetails').html(h);
        }, 'html');
    }
    
	</script>
</head>
<body>
<div id="loadingPano" >
<div class="layerHeader clearfix">
	<c:choose>
	   <c:when test="${inventoryRequestEx.id!=null && inventoryRequestEx.id!=''}">
	    <!-- 编辑 --> 
			<p class="headerTitle"><spring:message code="inventory_requestex_create_editTitle"/></p>
       </c:when>
       <c:otherwise>
        <!-- 创建 --> 
            <p class="headerTitle"><spring:message code="inventory_requestex_create_createTitle"/></p>
       </c:otherwise>
    </c:choose>
    <div class="headerButton clearfix">
    <c:if test="${imageStr == 'customizationUnitCost' }">
    	<!-- 检索 -->
    	<button type="button" onclick="getCoMaterialList();"><spring:message code="commom_check"/></button>
    </c:if>
    <c:if test="${imageStr == null || imageStr == '' }">
    <!-- 申请原辅料按钮 -->
        <button type="button" id="btnRequestMaterial" onclick="showInventoryMaterial()"><spring:message code="inventory_request_create_btn_material"/></button>
       </c:if>
		<!-- 保存 -->
        <button type="button" onclick="saveForm.save(this)"><spring:message code="common_save"/></button>
        <!-- 取消 -->
        <button onclick="closeWin()"><spring:message code="btn_cancle"/></button>
    </div>
</div>
<form id="inputForm" method="post">
<c:set value="<%=ResourcesUtil.getConfig(\"outbound_category\")%>" var="varOutboundCategory" />
<input type="hidden" id="id" name="id" value="${inventoryRequestEx.id}"/>
<input type="hidden" id="trIndex" name="trIndex" value="${inventoryRequestEx.trIndex}"/>
<input type="hidden" id="indentIdTemp" value="${inventoryRequestEx.indentID}"/>
<div class="smOrderBox">
    <div class="items clearfix">
        <div class="col-33 clearfix">
            <!-- 出库单号 -->
            <p class="tit"><spring:message code="inventory_requestex_create_requestNo"/></p>
            <p id="iRNoHtml">${inventoryRequestEx.inventoryRequestNo}</p>
            <input type="hidden" id="inventoryRequestNo" name="inventoryRequestNo" value="${inventoryRequestEx.inventoryRequestNo}">
        </div>
        <div class="col-33 clearfix">
            <!-- 申请人 -->
            <p class="tit" style="width: 60px;"><spring:message code="inventory_requestex_create_requestUser"/></p>
            <p>${inventoryRequestEx.requestUser}</p>
        </div>
        <div class="col-33 clearfix">
            <!-- 申请日期 -->
            <p class="tit" style="width: 60px;"><spring:message code="inventory_requestex_create_requestDate"/></p>
            <p><fmt:formatDate value="${inventoryRequestEx.requestDate}" pattern="yyyy-MM-dd" /></p>
        </div>
    </div>
    <div class="items clearfix">
        <c:if test="${imageStr == 'customizationUnitCost' }">
        <div class="col-33 clearfix haveToBox">
			<!-- 定制合同号-->
			<p class="tit"><spring:message code="unitCost_export_select_contractNo"/></p>
			<div class="timeBox">
				<select id="contractID" name="contractID" style="width: 180px;" onchange="getCoMaterialList();">
					<option value=""><spring:message code="unitCost_export_select_pleaseChoose"/></option>
					<c:forEach items="${contractList }" var="ct">
						<option value="${ct.contractID }" pId-value="${ct.productionID }" pNo-value="${ct.productionNo }" <c:if test="${inventoryRequestEx.contractID == ct.contractID }">selected="selected"</c:if>>${ct.contractNo }</option>
					</c:forEach>
				</select> 
			</div>
        </div>
        </c:if>
        <div class="col-50 clearfix">
            <!-- 出库类别 -->
            <p class="tit"><spring:message code="inventory_requestex_create_inventoryCategory"/></p>
            <select style="width:150px" id="inventoryCategory" name="inventoryCategory" disabled="disabled">
            <option value=""><spring:message code="customer_pleaseChoose"/></option>
                <c:forEach items="${fns:getDictList(varOutboundCategory)}"   var="outboundCategoryInfo">
                    <option <c:if test="${fn:split(inventoryRequestEx.inventoryCategory,'-')[1] eq outboundCategoryInfo.itemValue}">selected="selected"</c:if> value="${outboundCategoryInfo.itemCode}-${outboundCategoryInfo.itemValue}" > 
                        ${outboundCategoryInfo.itemName}
                    </option>
                </c:forEach>
            </select>
        </div>
    </div>
    <c:if test="${imageStr == 'produceNotice' }">
    <div class="items clearfix">
        <div class="col-33 clearfix">
            <!-- 客户名称-->
            <p class="tit"><spring:message code="inventory_requestex_create_customerName"/></p>
            <select id="ognizationID" name="venderId" style="width: 150px" onchange="newCostomer();" data-rule-required="true" data-msg-required="<spring:message code="contract_error_msg_customerName" />">
            <option value=""><spring:message code="contract_edit_please" /></option>
            <c:forEach items="${customerList }" var="customer">
            <option value="${customer.ognizationID }" <c:if test="${inventoryRequestEx.venderId eq customer.ognizationID }">selected="selected"</c:if>>${customer.ognizationName }</option>
            </c:forEach>
            </select>
        </div>
        <div id="indentHtml" class="col-33 clearfix">
            <!-- 客户订单号 -->
            <p class="tit" style="width: 75px;"><spring:message code="inventory_requestex_create_indentNo"/></p>
            <select id="indentID" name="indentID" style="width: 200px" onchange="changeIndent();" data-rule-required="true" data-msg-required="<spring:message code="contract_error_msg_customerName" />">
            <option value=""><spring:message code="contract_edit_please" /></option>
            <c:forEach items="${indentList }" var="indent">
            <option value="${indent.indentID }" <c:if test="${inventoryRequestEx.indentID eq indent.indentID }">selected="selected"</c:if>>${indent.indentNO }</option>
            </c:forEach>
            </select>
        </div>
        <div id="styleHtml" class="col-33 clearfix">
            <!-- 款号/名称 -->
            <p class="tit"><spring:message code="inventory_requestex_create_styleNoName"/></p>
            <label>${bigcargoOrder.styleCustomerName}${bigcargoOrder.styleNameCN}</label>
        </div>
    </div>
    </c:if>
</div>
<div class="tableArea">
    <div class="tableScrollSm" <c:if test="${imageStr == 'customizationUnitCost' }">style="overflow:auto;width:853px;height:440px;"</c:if><c:if test="${imageStr != 'customizationUnitCost' }">style="overflow:auto;width:853px;height:400px;"</c:if>>
        <table cellpadding="0" class="tableHead">
            <thead>
            <tr>
            	<!-- 操作 -->
                <th style="width:50px;"><spring:message code="inventory_requestex_create_details_operate"/></th>
                <!-- 物料图片 -->
                <th class="tab-wltp"><spring:message code="inventory_requestex_create_details_img"/></th>
                <!-- 名称编码 -->
                <th><p class="tab-wlmcbj"><spring:message code="inventory_requestex_create_details_nameCode"/></p></th>
                <!-- 物料类别 -->
                <th><p class="width-80px"><spring:message code="inventory_requestex_create_details_materialCategory"/></p></th>
                <!-- 颜色 -->
                <th><p class="width-80px"><spring:message code="inventory_requestex_create_details_color"/></p></th>
                <!-- 成分 -->
                <th><p class="width-80px"><spring:message code="inventory_requestex_create_details_composition"/></p></th>
                <!-- 幅宽 -->
                <th><p class="width-80px"><spring:message code="inventory_requestex_create_details_spec"/></p></th>
                <!-- 库存数量 -->
                <th class="width-120px"><spring:message code="inventory_requestex_create_details_materialQuantity"/></th>
                <!-- 申请出库数量 -->
                <th class="width-120px"><spring:message code="inventory_requestex_create_details_requestQuantity"/></th>
            </tr>
            </thead>
        </table>
        <table cellpadding="0" class="tableBody" id="tableRequestDetails">
        	<tbody id="tbodyHtml">
        <c:if test="${not empty inventoryRequestEx.requestDetailsList}">
            <c:forEach items="${inventoryRequestEx.requestDetailsList}" var="requestDetailsInfo" varStatus="status">
            <tr>
                <td style="width:50px;"><c:if test="${imageStr == null || imageStr == '' }"><img src="${ctxStatic}/images/del_icon.png" class="delBtn" onclick='deleteInventoryRequestExDetials(${status.index})'></c:if></td>
                <td class="tab-wltp">
                  <c:if test="${not empty requestDetailsInfo.filePath}">
                        <img src="${requestDetailsInfo.filePath}" class="wltp">
                  </c:if>
                  <c:if test="${empty requestDetailsInfo.filePath}">
                        <img src="${ctxStatic}/images/pic-none.jpg" class="wltp">
                  </c:if>
                </td>
                <td><p class="tab-wlmcbj"><c:if test="${imageStr != 'customizationUnitCost' }">${requestDetailsInfo.materialNameCn}<br></c:if>${requestDetailsInfo.materialCode}</p></td>
                <td><p class="width-80px">${fns:getDictName(requestDetailsInfo.materialCategory)}</p></td>
                <td><p class="width-80px">${requestDetailsInfo.materialColor}</p></td>
                <td><p class="width-80px">${requestDetailsInfo.materialComposition}</p></td>
                <td><p class="width-80px">${requestDetailsInfo.materialSpec}</p></td>
                <td class="subDetails width-120px"><p class="textRight"><fmt:formatNumber value="${requestDetailsInfo.materialQuantity}" pattern="#,##0.00#"/></p></td>
                <c:if test="${imageStr ne 'produceNotice' }">
	                <td class="subDetails width-120px realQuantity textRight"><input type="tel" name="requestDetailsList[${status.index}].requestQuantity" value="<fmt:formatNumber value="${requestDetailsInfo.requestQuantity}" pattern="#,##0.00#"/>" maxlength="11" onblur="formatMoney(this, 2);checkQuantity(this);" onfocus="unFormat(this)"></td>
                </c:if>
                <c:if test="${imageStr eq 'produceNotice' }">
	                <td class='subDetails width-120px textRight'><p class="textRight"><fmt:formatNumber value="${requestDetailsInfo.requestQuantity}" pattern="#,##0.00#"/></p></td>
                	<input type="hidden" name='requestDetailsList[${status.index}].requestQuantity' value="${requestDetailsInfo.requestQuantity}"/>
                </c:if>
                <input type="hidden"  class="subMaterialId" name="requestDetailsList[${status.index}].materialId" value="${requestDetailsInfo.materialId}"/>
                <input type="hidden" name="requestDetailsList[${status.index}].materialCode" value="${requestDetailsInfo.materialCode}"/>
               	<input type="hidden" class="mQuantity" value="${requestDetailsInfo.materialQuantity}"/>
               	<input type="hidden" name="requestDetailsList[${status.index}].filePath" value="${requestDetailsInfo.filePath}"/>
                <input type="hidden" name="requestDetailsList[${status.index}].materialNameCn" value="${requestDetailsInfo.materialNameCn}"/>
                <input type="hidden" name="requestDetailsList[${status.index}].materialSpec" value="${requestDetailsInfo.materialSpec}"/>
                <input type="hidden" name="requestDetailsList[${status.index}].materialComposition" value="${requestDetailsInfo.materialComposition}"/>
                <input type="hidden" name="requestDetailsList[${status.index}].materialColor" value="${requestDetailsInfo.materialColor}"/>
                <input type="hidden" name="requestDetailsList[${status.index}].materialQuantity" value="${requestDetailsInfo.materialQuantity}"/>
            </tr>
            </c:forEach>
            </c:if>
            </tbody>
        </table>
    </div>
</div>
</form>
</div>
</body>
</html>